import Vue from 'vue'
import Router from 'vue-router'
import Main from './views/Main.vue'
import CategorEdit from './views/CategorEdit.vue'
import CategorList from './views/CategorList.vue'
import ItemsEdit from './views/itemsEdit.vue'
import ItemsList from './views/itemsList.vue'
import HeroEdit from './views/HeroEdit.vue'
import HeroList from './views/HeroList.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      mame:'main',
      component:Main,
      children:[
        {path:'/categories/create',component:CategorEdit},
        {path:'/categories/edit/:id',component:CategorEdit,props:true},
        {path:'/categories/list',component:CategorList},
        {path:'/items/create',component:ItemsEdit},
        {path:'/items/edit/:id',component:ItemsEdit,props:true},
        {path:'/items/list',component:ItemsList},
        {path:'/heroes/create',component:HeroEdit},
        {path:'/heroes/edit/:id',component:HeroEdit,props:true},
        {path:'/heroes/list',component:HeroList}
      ]
    },
  ]
})
